package com.genntii.examManager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.genntii.examManager.domain.entity.Subject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

@Mapper
public interface SubjectMapper extends BaseMapper<Subject> {

    @Select("select * from subject limit #{pageNum},#{pageSize}")
    ArrayList<Subject> getSubjectList(@Param("pageNum") Integer pageNum,
                                      @Param("pageSize") Integer pageSize);

    @Select("select count(*) from subject")
    long getSubjectTotal();

}
